import React, { Component } from 'react'
const Home = React.lazy(() => import('../pages/home'))
const Layout = React.lazy(() => import('../pages/layout'))
const Login = React.lazy(() => import('../pages/login'))
const Set = React.lazy(() => import('../pages/set'))
const Table = React.lazy(() => import('../pages/table'))
const My = React.lazy(() => import('../pages/my'))

export interface RouteType {
	path: string,
	element: React.FC | React.ClassicComponentClass
	children?: RouteType[]
}

const routes: RouteType[] = [{
	path: '/',
	element: Layout,
	children: [{
		path: '/',
		element: Home
	}, {
		path: '/table',
		element: Table
	}, {
		path: '/set',
		element: Set
	}, {
		path: '/my',
		element: My
	}]
}, {
	path: '/login',
	element: Login
}]

export default routes